import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.security.huks.d.ts',
  content: "/*\n * Copyright (c) 2022-2023 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit UniversalKeystoreKit\n */\nimport type { AsyncCallback } from './@ohos.base';\n/**\n * OpenHarmony Universal KeyStore\n *\n * @namespace huks\n * @syscap SystemCapability.Security.Huks.Core\n * @since 8\n */\n/**\n * OpenHarmony Universal KeyStore\n *\n * @namespace huks\n * @syscap SystemCapability.Security.Huks.Core\n * @atomicservice\n * @since 11\n */\ndeclare namespace huks {\n    /**\n     * Generate Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of generateKey.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.generateKeyItem\n     */\n    function generateKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Generate Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.generateKeyItem\n     */\n    function generateKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Generates a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for generating the key. The algorithm, key purpose,\n     * and key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * this API does not return the key content because the key is always protected in a TEE. If an exception occurs in\n     * the generation process, an error is captured.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Generates a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for generating the key. The algorithm, key purpose,\n     * and key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * this API does not return the key content because the key is always protected in a TEE. If an exception occurs in\n     * the generation process, an error is captured.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function generateKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;\n    /**\n     * Generates a key. This API uses a promise to return the result. Because the key is always\n     * protected in a trusted environment (such as a TEE), the promise does not return the key content.\n     * It returns only the information indicating whether the API is successfully called.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for generating the key. The algorithm, key purpose,\n     * and key length are mandatory.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Generates a key. This API uses a promise to return the result. Because the key is always\n     * protected in a trusted environment (such as a TEE), the promise does not return the key content.\n     * It returns only the information indicating whether the API is successfully called.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for generating the key. The algorithm, key purpose,\n     * and key length are mandatory.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function generateKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;\n    /**\n     * Delete Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of deleteKey.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.deleteKeyItem\n     */\n    function deleteKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Delete Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.deleteKeyItem\n     */\n    function deleteKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Deletes a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to delete. It must be the key alias passed in when the key\n     * was generated.\n     * @param { HuksOptions } options - Properties of the key to delete. For example, you can pass in HuksAuthStorageLevel\n     * to specify the security level of the key to delete. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Deletes a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to delete. It must be the key alias passed in when the key\n     * was generated.\n     * @param { HuksOptions } options - Properties of the key to delete. For example, you can pass in HuksAuthStorageLevel\n     * to specify the security level of the key to delete. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;\n    /**\n     * Deletes a key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to delete. It must be the key alias passed in when the key\n     * was generated.\n     * @param { HuksOptions } options - Options for deleting the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to delete. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Deletes a key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to delete. It must be the key alias passed in when the key\n     * was generated.\n     * @param { HuksOptions } options - Options for deleting the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to delete. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function deleteKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;\n    /**\n     * Import Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of importKey.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.importKeyItem\n     */\n    function importKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Import Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.importKeyItem\n     */\n    function importKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Imports a key in plaintext. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for the import and key to import. The algorithm, key purpose, and\n     * key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, no\n     * error value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Imports a key in plaintext. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for the import and key to import. The algorithm, key purpose, and\n     * key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, no\n     * error value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    /**\n     * Imports a key in plaintext. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for the import and key to import. The algorithm, key purpose, and\n     * key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, no\n     * error value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    function importKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;\n    /**\n     * Imports a key in plaintext. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for the import and key to import. The algorithm, key purpose, and\n     * key length are mandatory.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Imports a key in plaintext. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - Tags required for the import and key to import. The algorithm, key purpose, and\n     * key length are mandatory.\n     * @returns { Promise<void> } the promise returned by the function.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function importKeyItem(keyAlias: string, options: HuksOptions): Promise<void>;\n    /**\n     * Imports a wrapped key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the wrapped key to import.\n     * @param { string } wrappingKeyAlias - Alias of the data used to unwrap the key imported.\n     * @param { HuksOptions } options - Tags required for the import and the wrapped key to import.\n     * The algorithm, key purpose, and key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Imports a wrapped key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the wrapped key to import.\n     * @param { string } wrappingKeyAlias - Alias of the data used to unwrap the key imported.\n     * @param { HuksOptions } options - Tags required for the import and the wrapped key to import.\n     * The algorithm, key purpose, and key length are mandatory.\n     * @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,\n     * no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    function importWrappedKeyItem(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions, callback: AsyncCallback<void>): void;\n    /**\n     * Imports a wrapped key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the wrapped key to import.\n     * @param { string } wrappingKeyAlias - Alias of the data used to unwrap the key imported.\n     * @param { HuksOptions } options - Tags required for the import and the wrapped key to import. The algorithm, key\n     * purpose, and key length are mandatory.\n     * @returns { Promise<void> } Promise that returns no value.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Imports a wrapped key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the wrapped key to import.\n     * @param { string } wrappingKeyAlias - Alias of the data used to unwrap the key imported.\n     * @param { HuksOptions } options - Tags required for the import and the wrapped key to import. The algorithm, key\n     * purpose, and key length are mandatory.\n     * @returns { Promise<void> } Promise that returns no value.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000013 - queried credential does not exist\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function importWrappedKeyItem(keyAlias: string, wrappingKeyAlias: string, options: HuksOptions): Promise<void>;\n    /**\n     * Export Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of exportKey.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.exportKeyItem\n     */\n    function exportKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Export Key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.exportKeyItem\n     */\n    function exportKey(keyAlias: string, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Exports a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned and outData contains the public key exported. Otherwise,\n     * an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Exports a key. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned and outData contains the public key exported. Otherwise,\n     * an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    function exportKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Exports a key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful, outData\n     * in HuksReturnResult is the public key exported.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Exports a key. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful, outData\n     * in HuksReturnResult is the public key exported.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function exportKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;\n    /**\n     * Get properties of the key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of getKeyProperties.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.getKeyItemProperties\n     */\n    function getKeyProperties(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Get properties of the key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.getKeyItemProperties\n     */\n    function getKeyProperties(keyAlias: string, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Obtains key properties. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned and properties contains the parameters required for generating the key. If the\n     * operation fails, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Obtains key properties. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned and properties contains the parameters required for generating the key. If the\n     * operation fails, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    function getKeyItemProperties(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Obtains key properties. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful,\n     * properties in HuksReturnResult holds the parameters required for generating the key.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Obtains key properties. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Key alias, which must be the same as the alias used when the key was generated.\n     * @param { HuksOptions } options - Empty object (leave this parameter empty).\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful,\n     * properties in HuksReturnResult holds the parameters required for generating the key.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function getKeyItemProperties(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;\n    /**\n     * Check whether the key exists.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<boolean> } callback - the callback of isKeyExist.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.isKeyItemExist\n     */\n    function isKeyExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;\n    /**\n     * Check whether the key exists.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<boolean> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.isKeyItemExist\n     */\n    function isKeyExist(keyAlias: string, options: HuksOptions): Promise<boolean>;\n    /**\n     * Checks whether a key exists. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to check.\n     * @param { HuksOptions } options - Options for checking the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the key exists, data is true.\n     * If the key does not exist, error is the error code.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    function isKeyItemExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;\n    /**\n     * Checks whether a key exists. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to check.\n     * @param { HuksOptions } options - Options for checking the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @returns { Promise<boolean> } Promise used to return the result. If the key exists, then() performs subsequent\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    function isKeyItemExist(keyAlias: string, options: HuksOptions): Promise<boolean>;\n    /**\n     * Checks whether a key exists. This API uses an asynchronous callback to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to check.\n     * @param { HuksOptions } options - Options for checking the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the key exists, data is true.\n     * Otherwise, data is false.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function hasKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<boolean>): void;\n    /**\n     * Checks whether a key exists. This API uses a promise to return the result.\n     *\n     * @param { string } keyAlias - Alias of the key to check.\n     * @param { HuksOptions } options - Options for checking the key. For example, you can pass in HuksAuthStorageLevel to\n     * specify the security level of the key to check. HuksAuthStorageLevel can be left empty, which means the default\n     * value HUKS_AUTH_STORAGE_LEVEL_DE is used.\n     * @returns { Promise<boolean> } Promise used to return the result. If the key exists, true is returned. If the key\n     * does not exist, false is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function hasKeyItem(keyAlias: string, options: HuksOptions): Promise<boolean>;\n    /**\n     * Init Operation.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @param { AsyncCallback<HuksHandle> } callback - the callback of init, include the handle.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.initSession\n     */\n    function init(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksHandle>): void;\n    /**\n     * Init Operation.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } options - options indicates the properties of the key.\n     * @returns { Promise<HuksHandle> } the promise returned by the function, include the handle.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.initSession\n     */\n    function init(keyAlias: string, options: HuksOptions): Promise<HuksHandle>;\n    /**\n     * Initializes a session for a key operation. This API uses an asynchronous callback to return the\n     * result. huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { string } keyAlias - Alias of the key involved in the initSession operation.\n     * @param { HuksOptions } options - Parameter set used for the initSession operation.\n     * @param { AsyncCallback<HuksSessionHandle> } callback - Callback used to return a session handle for subsequent\n     * operations.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000010 - the number of sessions has reached limit\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Initializes a session for a key operation. This API uses an asynchronous callback to return the\n     * result. huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { string } keyAlias - Alias of the key involved in the initSession operation.\n     * @param { HuksOptions } options - Parameter set used for the initSession operation.\n     * @param { AsyncCallback<HuksSessionHandle> } callback - Callback used to return a session handle for subsequent\n     * operations.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000010 - the number of sessions has reached limit\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksSessionHandle>): void;\n    /**\n     * Initializes a session for a key operation. This API uses a promise to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { string } keyAlias - Alias of the key involved in the initSession operation.\n     * @param { HuksOptions } options - Parameter set used for the initSession operation.\n     * @returns { Promise<HuksSessionHandle> } Promise used to return a session handle for subsequent operations.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000010 - the number of sessions has reached limit\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Initializes a session for a key operation. This API uses a promise to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { string } keyAlias - Alias of the key involved in the initSession operation.\n     * @param { HuksOptions } options - Parameter set used for the initSession operation.\n     * @returns { Promise<HuksSessionHandle> } Promise used to return a session handle for subsequent operations.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000010 - the number of sessions has reached limit\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function initSession(keyAlias: string, options: HuksOptions): Promise<HuksSessionHandle>;\n    /**\n     * Update Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { Uint8Array } token - token indicates the value of token.\n     * @param { HuksOptions } options - options indicates the properties of the update operation.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of update.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.updateSession\n     */\n    function update(handle: number, token?: Uint8Array, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Update Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { Uint8Array } token - indicates the value of token.\n     * @param { HuksOptions } options - options indicates the properties of the update operation.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.updateSession\n     */\n    function update(handle: number, token?: Uint8Array, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Updates the key operation by segment. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Updates the key operation by segment. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function updateSession(handle: number, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Updates the key operation by segment. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Updates the key operation by segment. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function updateSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Updates the key operation by segment. This API uses a promise to return the result. huks.initSession,\n     * huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank,\n     * refined key access control is not performed.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Updates the key operation by segment. This API uses a promise to return the result. huks.initSession,\n     * huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the updateSession operation.\n     * @param { HuksOptions } options - Parameter set used for the updateSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank,\n     * refined key access control is not performed.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the updateSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function updateSession(handle: number, options: HuksOptions, token?: Uint8Array): Promise<HuksReturnResult>;\n    /**\n     * Finish Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { HuksOptions } options - options indicates the properties of the finish operation.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of finish.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.finishSession\n     */\n    function finish(handle: number, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Finish Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { HuksOptions } options - options indicates the properties of the finish operation.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.finishSession\n     */\n    function finish(handle: number, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Finishes the key operation. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the finishSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Finishes the key operation. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the finishSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function finishSession(handle: number, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Finishes the key operation. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the finishSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Finishes the key operation. This API uses an asynchronous callback to return the result.\n     * huks.initSession, huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the finishSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Finishes the key operation. This API uses a promise to return the result. huks.initSession,\n     * huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank,\n     * refined key access control is not performed.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Finishes the key operation. This API uses a promise to return the result. huks.initSession,\n     * huks.updateSession, and huks.finishSession must be used together.\n     *\n     * @param { number } handle - Handle for the finishSession operation.\n     * @param { HuksOptions } options - Parameter set used for the finishSession operation.\n     * @param { Uint8Array } token - Authentication token for refined key access control. If this parameter is left blank,\n     * refined key access control is not performed.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function finishSession(handle: number, options: HuksOptions, token?: Uint8Array): Promise<HuksReturnResult>;\n    /**\n     * Abort Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { HuksOptions } options - options indicates the properties of the abort operation.\n     * @param { AsyncCallback<HuksResult> } callback - the callback of finishSession.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.abortSession\n     */\n    function abort(handle: number, options: HuksOptions, callback: AsyncCallback<HuksResult>): void;\n    /**\n     * Abort Operation.\n     *\n     * @param { number } handle - indicates the handle of the init operation.\n     * @param { HuksOptions } options - options indicates the properties of the abort operation.\n     * @returns { Promise<HuksResult> } the promise returned by the function.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.abortSession\n     */\n    function abort(handle: number, options: HuksOptions): Promise<HuksResult>;\n    /**\n     * Aborts a key operation. This API uses an asynchronous callback to return the result.\n     *\n     * @param { number } handle - Handle for the abortSession operation.\n     * @param { HuksOptions } options - Parameter set used for the abortSession operation.\n     * @param { AsyncCallback<void> } callback - Callback used to return the abortSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Aborts a key operation. This API uses an asynchronous callback to return the result.\n     *\n     * @param { number } handle - Handle for the abortSession operation.\n     * @param { HuksOptions } options - Parameter set used for the abortSession operation.\n     * @param { AsyncCallback<void> } callback - Callback used to return the abortSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    function abortSession(handle: number, options: HuksOptions, callback: AsyncCallback<void>): void;\n    /**\n     * Aborts a key operation. This API uses a promise to return the result.\n     *\n     * @param { number } handle - Handle for the abortSession operation.\n     * @param { HuksOptions } options - Parameter set used for the abortSession operation.\n     * @returns { Promise<void> } Promise used to return the abortSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Aborts a key operation. This API uses a promise to return the result.\n     *\n     * @param { number } handle - Handle for the abortSession operation.\n     * @param { HuksOptions } options - Parameter set used for the abortSession operation.\n     * @returns { Promise<void> } Promise used to return the abortSession operation result.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 11\n     */\n    function abortSession(handle: number, options: HuksOptions): Promise<void>;\n    /**\n     * Obtains the certificate used to attest a key. This API uses an asynchronous callback to return the result.\n     *\n     * @permission ohos.permission.ATTEST_KEY\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 201 - check permission failed\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    function attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Obtains the certificate used to attest a key. This API uses a promise to return the result.\n     *\n     * @permission ohos.permission.ATTEST_KEY\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful,\n     * certChains in HuksReturnResult is the certificate chain obtained.\n     * @throws { BusinessError } 201 - check permission failed\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    function attestKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;\n    /**\n     * Obtains the certificate for anonymous attestation. This API uses an asynchronous callback to return\n     * the result. This operation requires Internet access and takes time. If error code 12000012 is returned, the network\n     * is abnormal. If the device is not connected to the network, display a message, indicating that the network is not\n     * connected. If the network is connected, the failure may be caused by network jitter. Try again later.\n     *\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 11\n     */\n    /**\n     * Obtains the certificate for anonymous attestation. This API uses an asynchronous callback to return\n     * the result. This operation requires Internet access and takes time. If error code 12000012 is returned, the network\n     * is abnormal. If the device is not connected to the network, display a message, indicating that the network is not\n     * connected. If the network is connected, the failure may be caused by network jitter. Try again later.\n     *\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @param { AsyncCallback<HuksReturnResult> } callback - Callback used to return the result. If the operation is\n     * successful, no err value is returned; otherwise, an error code is returned.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function anonAttestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback<HuksReturnResult>): void;\n    /**\n     * Obtains the certificate for anonymous attestation. This API uses a promise to return the result. This\n     * operation requires Internet access and takes time. If error code 12000012 is returned, the network is abnormal. If\n     * the device is not connected to the network, display a message, indicating that the network is not connected. If the\n     * network is connected, the failure may be caused by network jitter. Try again later.\n     *\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful,\n     * certChains in HuksReturnResult is the certificate chain obtained.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 11\n     */\n    /**\n     * Obtains the certificate for anonymous attestation. This API uses a promise to return the result. This\n     * operation requires Internet access and takes time. If error code 12000012 is returned, the network is abnormal. If\n     * the device is not connected to the network, display a message, indicating that the network is not connected. If the\n     * network is connected, the failure may be caused by network jitter. Try again later.\n     *\n     * @param { string } keyAlias - Alias of the key. The certificate to be obtained stores the key.\n     * @param { HuksOptions } options - Parameters and data required for obtaining the certificate.\n     * @returns { Promise<HuksReturnResult> } Promise used to return the result. If the operation is successful,\n     * certChains in HuksReturnResult is the certificate chain obtained.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000001 - algorithm mode is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000011 - queried entity does not exist\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function anonAttestKeyItem(keyAlias: string, options: HuksOptions): Promise<HuksReturnResult>;\n    /**\n     * Obtains the SDK version of the current system.\n     *\n     * @param { HuksOptions } options - Empty object, which is used to hold the SDK version.\n     * @returns { string } SDK version obtained.\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 11\n     */\n    function getSdkVersion(options: HuksOptions): string;\n    /**\n     * Lists key aliases. This API uses a promise to return the result.\n     *\n     * @param { HuksOptions } options - Parameters for listing key aliases.\n     * @returns { Promise<HuksListAliasesReturnResult> } Promise used to return the key aliases obtained.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes:\n     *                                 1. Mandatory parameters are left unspecified.\n     *                                 2. Incorrect parameter types.\n     *                                 3. Parameter verification failed.\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    function listAliases(options: HuksOptions): Promise<HuksListAliasesReturnResult>;\n    /**\n     * Export the wrapped key protected by a specific key.\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } params - params indicates the export properties.\n     * @returns { Promise<HuksReturnResult> } the promise returned by the function.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000018 - the input parameter is invalid\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 20\n     */\n    function wrapKeyItem(keyAlias: string, params: HuksOptions): Promise<HuksReturnResult>;\n    /**\n     * Import the wrapped key protected by a specific key\n     *\n     * @param { string } keyAlias - keyAlias indicates the key's name.\n     * @param { HuksOptions } params - params indicates the import properties.\n     * @param { Uint8Array } wrappedKey -indicates the wrapped key.\n     * @returns { Promise<HuksReturnResult> } the promise returned by the function.\n     * @throws { BusinessError } 801 - api is not supported\n     * @throws { BusinessError } 12000002 - algorithm param is missing\n     * @throws { BusinessError } 12000003 - algorithm param is invalid\n     * @throws { BusinessError } 12000004 - operating file failed\n     * @throws { BusinessError } 12000005 - IPC communication failed\n     * @throws { BusinessError } 12000006 - error occurred in crypto engine\n     * @throws { BusinessError } 12000007 - this credential is already invalidated permanently\n     * @throws { BusinessError } 12000008 - verify auth token failed\n     * @throws { BusinessError } 12000009 - auth token is already timeout\n     * @throws { BusinessError } 12000012 - Device environment or input parameter abnormal\n     * @throws { BusinessError } 12000014 - memory is insufficient\n     * @throws { BusinessError } 12000015 - Failed to obtain the security information via UserIAM\n     * @throws { BusinessError } 12000018 - the input parameter is invalid\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 20\n     */\n    function unwrapKeyItem(keyAlias: string, params: HuksOptions, wrappedKey: Uint8Array): Promise<HuksReturnResult>;\n    /**\n     * Defines the param field in the properties array of options used in the APIs.\n     *\n     * @typedef HuksParam\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Defines the param field in the properties array of options used in the APIs.\n     *\n     * @typedef HuksParam\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface HuksParam {\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * @type { HuksTag }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        tag: HuksTag;\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * @type { boolean | number | bigint | Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        value: boolean | number | bigint | Uint8Array;\n    }\n    /**\n     * Interface of huks handle.\n     *\n     * @typedef HuksHandle\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.HuksSessionHandle\n     */\n    export interface HuksHandle {\n        /**\n         * @type { number }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        errorCode: number;\n        /**\n         * @type { number }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        handle: number;\n        /**\n         * @type { ?Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        token?: Uint8Array;\n    }\n    /**\n     * Defines the struct for a HUKS handle.\n     *\n     * @typedef HuksSessionHandle\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Defines the struct for a HUKS handle.\n     *\n     * @typedef HuksSessionHandle\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface HuksSessionHandle {\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * @type { number }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        handle: number;\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * @type { ?Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        challenge?: Uint8Array;\n    }\n    /**\n     * Defines options used in the APIs.\n     *\n     * @typedef HuksOptions\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Defines options used in the APIs.\n     *\n     * @typedef HuksOptions\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface HuksOptions {\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * @type { ?Array<HuksParam> }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        properties?: Array<HuksParam>;\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * @type { ?Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        inData?: Uint8Array;\n    }\n    /**\n     * Interface of huks result.\n     *\n     * @typedef HuksResult\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.HuksReturnResult\n     */\n    export interface HuksResult {\n        /**\n         * @type { number }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        errorCode: number;\n        /**\n         * @type { ?Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        outData?: Uint8Array;\n        /**\n         * @type { ?Array<HuksParam> }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        properties?: Array<HuksParam>;\n        /**\n         * @type { ?Array<string> }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        certChains?: Array<string>;\n    }\n    /**\n     * Represents the result returned.\n     *\n     * @typedef HuksReturnResult\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Represents the result returned.\n     *\n     * @typedef HuksReturnResult\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export interface HuksReturnResult {\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * @type { ?Uint8Array }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        outData?: Uint8Array;\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * @type { ?Array<HuksParam> }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        properties?: Array<HuksParam>;\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * @type { ?Array<string> }\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        certChains?: Array<string>;\n    }\n    /**\n   * Represents an array of key aliases.\n   *\n   * @typedef HuksListAliasesReturnResult\n   * @syscap SystemCapability.Security.Huks.Extension\n   * @atomicservice\n   * @since 12\n   */\n    export interface HuksListAliasesReturnResult {\n        /**\n         * the returned list of key aliases\n         *\n         * @type { Array<string> }\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        keyAliases: Array<string>;\n    }\n    /**\n     * Enum for huks error code.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     * @deprecated since 9\n     * @useinstead ohos.security.huks.HuksExceptionErrCode\n     */\n    export enum HuksErrorCode {\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_SUCCESS = 0,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_FAILURE = -1,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_BAD_STATE = -2,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_ARGUMENT = -3,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_NOT_SUPPORTED = -4,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_NO_PERMISSION = -5,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INSUFFICIENT_DATA = -6,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_BUFFER_TOO_SMALL = -7,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INSUFFICIENT_MEMORY = -8,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_COMMUNICATION_FAILURE = -9,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_STORAGE_FAILURE = -10,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_HARDWARE_FAILURE = -11,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_ALREADY_EXISTS = -12,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_NOT_EXIST = -13,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_NULL_POINTER = -14,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_FILE_SIZE_FAIL = -15,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_READ_FILE_FAIL = -16,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_PUBLIC_KEY = -17,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_PRIVATE_KEY = -18,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_KEY_INFO = -19,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_HASH_NOT_EQUAL = -20,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_MALLOC_FAIL = -21,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_WRITE_FILE_FAIL = -22,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_REMOVE_FILE_FAIL = -23,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_OPEN_FILE_FAIL = -24,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CLOSE_FILE_FAIL = -25,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_MAKE_DIR_FAIL = -26,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_KEY_FILE = -27,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_IPC_MSG_FAIL = -28,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_REQUEST_OVERFLOWS = -29,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_PARAM_NOT_EXIST = -30,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CRYPTO_ENGINE_ERROR = -31,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_COMMUNICATION_TIMEOUT = -32,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_IPC_INIT_FAIL = -33,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_IPC_DLOPEN_FAIL = -34,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_EFUSE_READ_FAIL = -35,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_NEW_ROOT_KEY_MATERIAL_EXIST = -36,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_UPDATE_ROOT_KEY_MATERIAL_FAIL = -37,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_VERIFICATION_FAILED = -38,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_ALG_FAIL = -100,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_KEY_SIZE_FAIL = -101,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_PADDING_FAIL = -102,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_PURPOSE_FAIL = -103,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_DIGEST_FAIL = -104,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_MODE_FAIL = -105,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_NONCE_FAIL = -106,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_AAD_FAIL = -107,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_IV_FAIL = -108,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_AE_TAG_FAIL = -109,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_SALT_FAIL = -110,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_CHECK_GET_ITERATION_FAIL = -111,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_ALGORITHM = -112,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_KEY_SIZE = -113,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_PADDING = -114,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_PURPOSE = -115,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_MODE = -116,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_DIGEST = -117,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_SIGNATURE_SIZE = -118,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_IV = -119,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_AAD = -120,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_NONCE = -121,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_AE_TAG = -122,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_SALT = -123,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_ITERATION = -124,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INVALID_OPERATION = -125,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_INTERNAL_ERROR = -999,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_ERROR_UNKNOWN_ERROR = -1000\n    }\n    /**\n     * Enumerates the error codes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 9\n     */\n    /**\n     * Enumerates the error codes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksExceptionErrCode {\n        /**\n         * Permission verification failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Permission verification failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_PERMISSION_FAIL = 201,\n        /**\n         * The caller is not a system application and cannot call the system API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 12\n         */\n        HUKS_ERR_CODE_NOT_SYSTEM_APP = 202,\n        /**\n         * Invalid parameters are detected. Possible causes:\n         * 1. Mandatory parameters are left unspecified.\n         * 2. Incorrect parameter types.\n         * 3. Parameter verification failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Invalid parameters are detected. Possible causes:\n         * 1. Mandatory parameters are left unspecified.\n         * 2. Incorrect parameter types.\n         * 3. Parameter verification failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401,\n        /**\n         * The API is not supported.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The API is not supported.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_NOT_SUPPORTED_API = 801,\n        /**\n         * The feature is not supported.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The feature is not supported.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED = 12000001,\n        /**\n         * Key algorithm parameters are missing.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Key algorithm parameters are missing.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT = 12000002,\n        /**\n         * Invalid key algorithm parameters are detected.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Invalid key algorithm parameters are detected.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT = 12000003,\n        /**\n         * The file operation failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The file operation failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_FILE_OPERATION_FAIL = 12000004,\n        /**\n         * The communication failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The communication failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_COMMUNICATION_FAIL = 12000005,\n        /**\n         * Failed to operate the algorithm library.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Failed to operate the algorithm library.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_CRYPTO_FAIL = 12000006,\n        /**\n         * Failed to access the key because the key has expired.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Failed to access the key because the key has expired.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED = 12000007,\n        /**\n         * Failed to access the key because the authentication has failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Failed to access the key because the authentication has failed.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED = 12000008,\n        /**\n         * Key access timed out.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Key access timed out.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_KEY_AUTH_TIME_OUT = 12000009,\n        /**\n         * The number of key operation sessions has reached the limit.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The number of key operation sessions has reached the limit.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_SESSION_LIMIT = 12000010,\n        /**\n         * The target object does not exist.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The target object does not exist.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_ITEM_NOT_EXIST = 12000011,\n        /**\n         * An external error occurs.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * An external error occurs.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_EXTERNAL_ERROR = 12000012,\n        /**\n         * The credential does not exist.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The credential does not exist.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013,\n        /**\n         * The memory is insufficient.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * The memory is insufficient.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_INSUFFICIENT_MEMORY = 12000014,\n        /**\n         * Failed to call other system services.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 9\n         */\n        /**\n         * Failed to call other system services.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ERR_CODE_CALL_SERVICE_FAILED = 12000015,\n        /**\n         * The required lock screen password is not set.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * The required lock screen password is not set.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ERR_CODE_DEVICE_PASSWORD_UNSET = 12000016,\n        /**\n         * The input parameter is invalid.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 20\n         */\n        HUKS_ERR_CODE_INVALID_ARGUMENT = 12000018\n    }\n    /**\n     * Enumerates the key purposes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the key purposes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksKeyPurpose {\n        /**\n         * Used to encrypt the plaintext.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Used to encrypt the plaintext.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_KEY_PURPOSE_ENCRYPT = 1,\n        /**\n         * Used to decrypt the cipher text.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Used to decrypt the cipher text.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_KEY_PURPOSE_DECRYPT = 2,\n        /**\n         * Used for signing.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used for signing.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_SIGN = 4,\n        /**\n         * Used to verify the signature.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used to verify the signature.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_VERIFY = 8,\n        /**\n         * Used to derive a key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used to derive a key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_DERIVE = 16,\n        /**\n         * Used for an encrypted export.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used for an encrypted export.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_WRAP = 32,\n        /**\n         * Used for an encrypted import.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used for an encrypted import.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_UNWRAP = 64,\n        /**\n         * Used to generate a message authentication code (MAC).\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used to generate a message authentication code (MAC).\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_MAC = 128,\n        /**\n         * Used for key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Used for key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_PURPOSE_AGREE = 256\n    }\n    /**\n     * Enumerates the digest algorithms.\n     *\n     * @enum { number }\n     *\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     */\n    /**\n     * Enumerates the digest algorithms.\n     *\n     * @enum { number }\n     *\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksKeyDigest {\n        /**\n         * No digest algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * No digest algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_NONE = 0,\n        /**\n         * MD5.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * MD5.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_MD5 = 1,\n        /**\n         * SM3.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * SM3.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SM3 = 2,\n        /**\n         * SHA-1.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * SHA-1.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SHA1 = 10,\n        /**\n         * SHA-224.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * SHA-224.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SHA224 = 11,\n        /**\n         * SHA-256.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * SHA-256.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SHA256 = 12,\n        /**\n         * SHA-384.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * SHA-384.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SHA384 = 13,\n        /**\n         * SHA-512.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * SHA-512.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DIGEST_SHA512 = 14\n    }\n    /**\n     * Enumerates the padding algorithms.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the padding algorithms.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksKeyPadding {\n        /**\n         * No padding algorithm is used.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * No padding algorithm is used.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_PADDING_NONE = 0,\n        /**\n         * Optimal Asymmetric Encryption Padding (OAEP).\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Optimal Asymmetric Encryption Padding (OAEP).\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_OAEP = 1,\n        /**\n         * Probabilistic Signature Scheme (PSS).\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Probabilistic Signature Scheme (PSS).\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_PSS = 2,\n        /**\n         * Public Key Cryptography Standards (PKCS) #1 v1.5.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Public Key Cryptography Standards (PKCS) #1 v1.5.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_PKCS1_V1_5 = 3,\n        /**\n         * PKCS #5.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * PKCS #5.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_PKCS5 = 4,\n        /**\n         * PKCS #7.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * PKCS #7.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_PKCS7 = 5,\n        /**\n         * ISO_IEC_9796_2.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_ISO_IEC_9796_2 = 6,\n        /**\n         * ISO_IEC_9797_1.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_PADDING_ISO_IEC_9797_1 = 7\n    }\n    /**\n     * Enumerates the cipher modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the cipher modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksCipherMode {\n        /**\n         * Electronic Code Block (ECB) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Electronic Code Block (ECB) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_ECB = 1,\n        /**\n         * Cipher Block Chaining (CBC) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Cipher Block Chaining (CBC) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_CBC = 2,\n        /**\n         * Counter (CTR) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Counter (CTR) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_CTR = 3,\n        /**\n         * Output Feedback (OFB) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Output Feedback (OFB) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_OFB = 4,\n        /**\n         * Ciphertext Feedback (CFB) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_CFB = 5,\n        /**\n         * Counter with CBC-MAC (CCM) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Counter with CBC-MAC (CCM) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_MODE_CCM = 31,\n        /**\n         * Galois/Counter (GCM) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Galois/Counter (GCM) mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_MODE_GCM = 32\n    }\n    /**\n     * Enumerates the key sizes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the key sizes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksKeySize {\n        /**\n         * Rivest-Shamir-Adleman (RSA) key of 512 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Rivest-Shamir-Adleman (RSA) key of 512 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_512 = 512,\n        /**\n         * RSA key of 768 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA key of 768 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_768 = 768,\n        /**\n         * RSA key of 1024 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA key of 1024 bits.\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_1024 = 1024,\n        /**\n         * RSA key of 2048 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA key of 2048 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_2048 = 2048,\n        /**\n         * RSA key of 3072 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA key of 3072 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_3072 = 3072,\n        /**\n         * RSA key of 4096 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA key of 4096 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_KEY_SIZE_4096 = 4096,\n        /**\n         * Elliptic Curve Cryptography (ECC) key of 224 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Elliptic Curve Cryptography (ECC) key of 224 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ECC_KEY_SIZE_224 = 224,\n        /**\n         * ECC key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ECC key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ECC_KEY_SIZE_256 = 256,\n        /**\n         * ECC key of 384 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ECC key of 384 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ECC_KEY_SIZE_384 = 384,\n        /**\n         * ECC key of 521 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ECC key of 521 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ECC_KEY_SIZE_521 = 521,\n        /**\n         * Advanced Encryption Standard (AES) key of 128 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Advanced Encryption Standard (AES) key of 128 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_AES_KEY_SIZE_128 = 128,\n        /**\n         * AES key of 192 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * AES key of 192 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_AES_KEY_SIZE_192 = 192,\n        /**\n         * AES key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * AES key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_AES_KEY_SIZE_256 = 256,\n        /**\n         * AES key of 512 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 11\n         */\n        HUKS_AES_KEY_SIZE_512 = 512,\n        /**\n         * Curve25519 key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Curve25519 key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CURVE25519_KEY_SIZE_256 = 256,\n        /**\n         * Diffie-Hellman (DH) key of 2048 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Diffie-Hellman (DH) key of 2048 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DH_KEY_SIZE_2048 = 2048,\n        /**\n         * DH key of 3072 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * DH key of 3072 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DH_KEY_SIZE_3072 = 3072,\n        /**\n         * DH key of 4096 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * DH key of 4096 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DH_KEY_SIZE_4096 = 4096,\n        /**\n         * ShangMi2 (SM2) key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * ShangMi2 (SM2) key of 256 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_SM2_KEY_SIZE_256 = 256,\n        /**\n         * ShangMi4 (SM4) key of 128 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * ShangMi4 (SM4) key of 128 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_SM4_KEY_SIZE_128 = 128,\n        /**\n         * DES key of 64 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_DES_KEY_SIZE_64 = 64,\n        /**\n         * 3DES key of 128 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_3DES_KEY_SIZE_128 = 128,\n        /**\n         * 3DES key of 192 bits.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_3DES_KEY_SIZE_192 = 192\n    }\n    /**\n     * Enumerates the key algorithms.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n   * Enumerates the key algorithms.\n   *\n   * @enum { number }\n   * @syscap SystemCapability.Security.Huks.Core\n   * @atomicservice\n   * @since 11\n   */\n    export enum HuksKeyAlg {\n        /**\n         * RSA.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * RSA.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_RSA = 1,\n        /**\n         * ECC.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ECC.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_ECC = 2,\n        /**\n         * DSA.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * DSA.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_DSA = 3,\n        /**\n         * AES.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * AES.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_ALG_AES = 20,\n        /**\n         * HMAC.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * HMAC.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_HMAC = 50,\n        /**\n         * HKDF.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * HKDF.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_HKDF = 51,\n        /**\n         * PBKDF2.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * PBKDF2.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_PBKDF2 = 52,\n        /**\n         * ECDH.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ECDH.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_ECDH = 100,\n        /**\n         * X25519.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * X25519.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_X25519 = 101,\n        /**\n         * Ed25519.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Ed25519.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_ED25519 = 102,\n        /**\n         * DH.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * DH.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_DH = 103,\n        /**\n         * SM2.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * SM2.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_SM2 = 150,\n        /**\n         * SM3.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * SM3.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_SM3 = 151,\n        /**\n         * SM4.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * SM4.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_SM4 = 152,\n        /**\n         * DES.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_DES = 160,\n        /**\n         * 3DES.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_3DES = 161,\n        /**\n         * CMAC.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_ALG_CMAC = 162\n    }\n    /**\n     * Enumerates the algorithm suites that can be used for importing a key in ciphertext.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the algorithm suites that can be used for importing a key in ciphertext.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksUnwrapSuite {\n        /**\n         * Use X25519 for key agreement and then use AES-256 GCM to encrypt the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Use X25519 for key agreement and then use AES-256 GCM to encrypt the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1,\n        /**\n         * Use ECDH for key agreement and then use AES-256 GCM to encrypt the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Use ECDH for key agreement and then use AES-256 GCM to encrypt the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2\n    }\n    /**\n     * Enumerates the key generation types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     */\n    /**\n     * Enumerates the key generation types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksKeyGenerateType {\n        /**\n         * Key generated by default.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Key generated by default.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_GENERATE_TYPE_DEFAULT = 0,\n        /**\n         * Derived key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Derived key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_GENERATE_TYPE_DERIVE = 1,\n        /**\n         * Key generated by agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Key generated by agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_GENERATE_TYPE_AGREE = 2\n    }\n    /**\n     * Enumerates the key generation modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the key generation modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksKeyFlag {\n        /**\n         * Import a key using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Import a key using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_FLAG_IMPORT_KEY = 1,\n        /**\n         * Generate a key by using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Generate a key by using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_FLAG_GENERATE_KEY = 2,\n        /**\n         * Generate a key by using a key agreement API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Generate a key by using a key agreement API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_FLAG_AGREE_KEY = 3,\n        /**\n         * Derive a key by using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Derive a key by using an API.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_FLAG_DERIVE_KEY = 4\n    }\n    /**\n     * Enumerates the key storage modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the key storage modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksKeyStorageType {\n        /**\n         * The key is managed locally. NOTE: This tag is deprecated since API version 10. No substitute is\n         * provided because this tag is not used in key management. In key derivation scenarios, use\n         * HUKS_STORAGE_ONLY_USED_IN_HUKS or HUKS_STORAGE_KEY_EXPORT_ALLOWED.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 10\n         */\n        HUKS_STORAGE_TEMP = 0,\n        /**\n         * The key is managed by the HUKS service. NOTE: This tag is deprecated since API version 10. No\n         * substitute is provided because this tag is not used in key management. In key derivation scenarios, use\n         * HUKS_STORAGE_ONLY_USED_IN_HUKS or HUKS_STORAGE_KEY_EXPORT_ALLOWED.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 10\n         */\n        HUKS_STORAGE_PERSISTENT = 1,\n        /**\n         * The key derived from the master key is stored in the HUKS and managed by the HUKS.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * The key derived from the master key is stored in the HUKS and managed by the HUKS.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_STORAGE_ONLY_USED_IN_HUKS = 2,\n        /**\n         * The key derived from the master key is exported to the service, and not managed by the HUKS.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * The key derived from the master key is exported to the service, and not managed by the HUKS.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3\n    }\n    /**\n     * Enumerates the types of keys to import. By default, a public key is imported. This field is not\n     * required when a symmetric key is imported.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the types of keys to import. By default, a public key is imported. This field is not\n     * required when a symmetric key is imported.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksImportKeyType {\n        /**\n         * Public key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Public key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_TYPE_PUBLIC_KEY = 0,\n        /**\n         * Private key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Private key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_TYPE_PRIVATE_KEY = 1,\n        /**\n         * Public and private key pair.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Public and private key pair.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_KEY_TYPE_KEY_PAIR = 2\n    }\n    /**\n     * Enumerates the salt_len types to set when PSS padding is used in RSA signing or signature\n     * verification.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 10\n     */\n    /**\n     * Enumerates the salt_len types to set when PSS padding is used in RSA signing or signature\n     * verification.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksRsaPssSaltLenType {\n        /**\n         * salt_len is set to the digest length.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * salt_len is set to the digest length.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_PSS_SALT_LEN_DIGEST = 0,\n        /**\n         * salt_len is set to the maximum length.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * salt_len is set to the maximum length.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_RSA_PSS_SALT_LEN_MAX = 1\n    }\n    /**\n     * Enumerates the user authentication types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the user authentication types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksUserAuthType {\n        /**\n         * Fingerprint authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Fingerprint authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_USER_AUTH_TYPE_FINGERPRINT = 1 << 0,\n        /**\n         * Facial authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Facial authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_USER_AUTH_TYPE_FACE = 1 << 1,\n        /**\n         * PIN authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * PIN authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_USER_AUTH_TYPE_PIN = 1 << 2,\n        /**\n         * Tui pin auth type.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 20\n         */\n        HUKS_USER_AUTH_TYPE_TUI_PIN = 1 << 5\n    }\n    /**\n     * Enumerates the access control types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the access control types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksAuthAccessType {\n        /**\n         * The key becomes invalid after the password is cleared.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * The key becomes invalid after the password is cleared.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0,\n        /**\n         * The key becomes invalid after a new biometric feature is added.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * The key becomes invalid after a new biometric feature is added.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1,\n        /**\n         * The key is always valid.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * The key is always valid.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_ACCESS_ALWAYS_VALID = 1 << 2\n    }\n    /**\n     * Enumerates the user authentication modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksUserAuthMode {\n        /**\n         * Local authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_USER_AUTH_MODE_LOCAL = 0,\n        /**\n         * Cross-device collaborative authentication.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_USER_AUTH_MODE_COAUTH = 1\n    }\n    /**\n     * Enumerates the storage security levels of a key.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 11\n     */\n    /**\n     * Enumerates the storage security levels of a key.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksAuthStorageLevel {\n        /**\n         * The key can be accessed only after the device is started.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * The key can be accessed only after the device is started.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_STORAGE_LEVEL_DE = 0,\n        /**\n         * The key can be accessed only after the first unlock of the device.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * The key can be accessed only after the first unlock of the device.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_STORAGE_LEVEL_CE = 1,\n        /**\n         * The key can be accessed only when the device is unlocked.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * The key can be accessed only when the device is unlocked.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_AUTH_STORAGE_LEVEL_ECE = 2\n    }\n    /**\n     * Enumerates the types of the challenges generated when a key is used.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the types of the challenges generated when a key is used.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksChallengeType {\n        /**\n         * Normal challenge, which is of 32 bytes by default.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Normal challenge, which is of 32 bytes by default.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_TYPE_NORMAL = 0,\n        /**\n         * Custom challenge, which supports only one authentication for multiple keys.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Custom challenge, which supports only one authentication for multiple keys.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_TYPE_CUSTOM = 1,\n        /**\n         * Challenge is not required.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Challenge is not required.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_TYPE_NONE = 2\n    }\n    /**\n     * Enumerates the positions of the 8-byte valid value in a custom challenge generated.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the positions of the 8-byte valid value in a custom challenge generated.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksChallengePosition {\n        /**\n         * Bytes 0 to 7.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Bytes 0 to 7.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_POS_0 = 0,\n        /**\n         * Bytes 8 to 15.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Bytes 8 to 15.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_POS_1,\n        /**\n         * Bytes 16 to 23.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Bytes 16 to 23.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_POS_2,\n        /**\n         * Bytes 24 to 31.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Bytes 24 to 31.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_CHALLENGE_POS_3\n    }\n    /**\n     * Enumerates the signature types of the key generated or imported.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 9\n     */\n    /**\n     * Enumerates the signature types of the key generated or imported.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksSecureSignType {\n        /**\n         * The signature carries authentication information. This field is specified when a key is generated or\n         * imported. When the key is used for signing, the data will be added with the authentication information and then\n         * be signed.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * The signature carries authentication information. This field is specified when a key is generated or\n         * imported. When the key is used for signing, the data will be added with the authentication information and then\n         * be signed.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_SECURE_SIGN_WITH_AUTHINFO = 1\n    }\n    /**\n     * Enumerates the tag transfer modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Extension\n     * @since 8\n     */\n    /**\n     * Enumerates the tag transfer modes.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 12\n     */\n    export enum HuksSendType {\n        /**\n         * The tag is sent asynchronously.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * The tag is sent asynchronously.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_SEND_TYPE_ASYNC = 0,\n        /**\n         * The tag is sent synchronously.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * The tag is sent synchronously.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_SEND_TYPE_SYNC = 1\n    }\n    /**\n     * Enum for key wrap type\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 20\n     */\n    export enum HuksKeyWrapType {\n        /**\n         * The hardware unique key wrap type\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 20\n         */\n        HUKS_KEY_WRAP_TYPE_HUK_BASED = 2\n    }\n    /**\n     * Enumerates the tag data types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the tag data types.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksTagType {\n        /**\n         * Invalid tag type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Invalid tag type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_INVALID = 0 << 28,\n        /**\n         * Number of the int type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Number of the int type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_INT = 1 << 28,\n        /**\n         * Number of the uint type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Number of the uint type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_UINT = 2 << 28,\n        /**\n         * BigInt.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * BigInt.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_ULONG = 3 << 28,\n        /**\n         * Boolean.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Boolean.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_BOOL = 4 << 28,\n        /**\n         * Uint8Array.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Uint8Array.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_TYPE_BYTES = 5 << 28\n    }\n    /**\n     * Enumerates the tags used to invoke parameters.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @since 8\n     */\n    /**\n     * Enumerates the tags used to invoke parameters.\n     *\n     * @enum { number }\n     * @syscap SystemCapability.Security.Huks.Core\n     * @atomicservice\n     * @since 11\n     */\n    export enum HuksTag {\n        /**\n         * Invalid TAG\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_INVALID = HuksTagType.HUKS_TAG_TYPE_INVALID | 0,\n        /* Base algorithm TAG: 1 - 200 */\n        /**\n         * Algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_ALGORITHM = HuksTagType.HUKS_TAG_TYPE_UINT | 1,\n        /**\n         * Purpose of the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Purpose of the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT | 2,\n        /**\n         * Key size.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Key size.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_KEY_SIZE = HuksTagType.HUKS_TAG_TYPE_UINT | 3,\n        /**\n         * Digest algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Digest algorithm.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_DIGEST = HuksTagType.HUKS_TAG_TYPE_UINT | 4,\n        /**\n         * Padding mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Padding mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_PADDING = HuksTagType.HUKS_TAG_TYPE_UINT | 5,\n        /**\n         * Cipher mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Cipher mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_BLOCK_MODE = HuksTagType.HUKS_TAG_TYPE_UINT | 6,\n        /**\n         * Key type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Key type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 7,\n        /**\n         * Associated authentication data.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Associated authentication data.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_ASSOCIATED_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 8,\n        /**\n         * Nonce for key encryption and decryption.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Nonce for key encryption and decryption.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_NONCE = HuksTagType.HUKS_TAG_TYPE_BYTES | 9,\n        /**\n         * IV.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * IV.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IV = HuksTagType.HUKS_TAG_TYPE_BYTES | 10,\n        /**\n         * Information generated during key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Information generated during key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 11,\n        /**\n         * Salt value used for key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Salt value used for key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_SALT = HuksTagType.HUKS_TAG_TYPE_BYTES | 12,\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_PWD = HuksTagType.HUKS_TAG_TYPE_BYTES | 13,\n        /**\n         * Number of iterations for key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Number of iterations for key derivation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ITERATION = HuksTagType.HUKS_TAG_TYPE_UINT | 14,\n        /**\n         * Key generation type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Key generation type.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_GENERATE_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 15,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_DERIVE_MAIN_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 16,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_DERIVE_FACTOR = HuksTagType.HUKS_TAG_TYPE_BYTES | 17,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_DERIVE_ALG = HuksTagType.HUKS_TAG_TYPE_UINT | 18,\n        /**\n         * Type of the algorithm used for key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Type of the algorithm used for key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AGREE_ALG = HuksTagType.HUKS_TAG_TYPE_UINT | 19,\n        /**\n         * Public key alias used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Public key alias used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 20,\n        /**\n         * Private key alias used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Private key alias used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 21,\n        /**\n         * Public key used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Public key used in key agreement.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AGREE_PUBLIC_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 22,\n        /**\n         * Key alias.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Key alias.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 23,\n        /**\n         * Size of the derived key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Size of the derived key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_DERIVE_KEY_SIZE = HuksTagType.HUKS_TAG_TYPE_UINT | 24,\n        /**\n         * Type of the imported key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Type of the imported key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IMPORT_KEY_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 25,\n        /**\n         * Algorithm suite required for encrypted imports.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Algorithm suite required for encrypted imports.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_UNWRAP_ALGORITHM_SUITE = HuksTagType.HUKS_TAG_TYPE_UINT | 26,\n        /**\n         * Storage type of the derived key or agreed key.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * Storage type of the derived key or agreed key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 29,\n        /**\n         * Type of the rsa_pss_salt_length.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * Type of the rsa_pss_salt_length.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 30,\n        /*\n         * Key authentication related TAG: 201 - 300\n         *\n         * Start of validity\n         */\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ACTIVE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 201,\n        /**\n         * Date when new \"messages\" should not be created.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ORIGINATION_EXPIRE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 202,\n        /**\n         * Date when existing \"messages\" should not be used.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_USAGE_EXPIRE_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 203,\n        /**\n         * Key creation time.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_CREATION_DATETIME = HuksTagType.HUKS_TAG_TYPE_ULONG | 204,\n        /* Other authentication related TAG: 301 - 500 */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ALL_USERS = HuksTagType.HUKS_TAG_TYPE_BOOL | 301,\n        /**\n         * ID of the user to which the key belongs.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * ID of the user to which the key belongs.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_USER_ID = HuksTagType.HUKS_TAG_TYPE_UINT | 302,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_NO_AUTH_REQUIRED = HuksTagType.HUKS_TAG_TYPE_BOOL | 303,\n        /**\n         * User authentication type. For details, see HuksUserAuthType. This parameter must be set together with\n         * HuksAuthAccessType. You can set a maximum of two user authentication types at a time. For example, if\n         * HuksAuthAccessType is HUKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL, you can set the user authentication type to\n         * HUKS_USER_AUTH_TYPE_FACE, HUKS_USER_AUTH_TYPE_FINGERPRINT or\n         * HUKS_USER_AUTH_TYPE_FACE | HUKS_USER_AUTH_TYPE_FINGERPRINT.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * User authentication type. For details, see HuksUserAuthType. This parameter must be set together with\n         * HuksAuthAccessType. You can set a maximum of two user authentication types at a time. For example, if\n         * HuksAuthAccessType is HUKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL, you can set the user authentication type to\n         * HUKS_USER_AUTH_TYPE_FACE, HUKS_USER_AUTH_TYPE_FINGERPRINT or\n         * HUKS_USER_AUTH_TYPE_FACE | HUKS_USER_AUTH_TYPE_FINGERPRINT.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_USER_AUTH_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 304,\n        /**\n         * One-time validity period of the authentication token.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * One-time validity period of the authentication token.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AUTH_TIMEOUT = HuksTagType.HUKS_TAG_TYPE_UINT | 305,\n        /**\n         * Authentication token.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Authentication token.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AUTH_TOKEN = HuksTagType.HUKS_TAG_TYPE_BYTES | 306,\n        /* Key secure access control and user auth TAG */\n        /**\n         * Access control type. For details, see HuksAuthAccessType. This parameter must be set together with\n         * HuksUserAuthType.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Access control type. For details, see HuksAuthAccessType. This parameter must be set together with\n         * HuksUserAuthType.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_AUTH_ACCESS_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 307,\n        /**\n         * Signature type of the key generated or imported.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Signature type of the key generated or imported.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_SECURE_SIGN_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 308,\n        /**\n         * Type of the challenge generated for a key. For details, see HuksChallengeType.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Type of the challenge generated for a key. For details, see HuksChallengeType.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_CHALLENGE_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 309,\n        /**\n         * Position of the 8-byte valid value in a custom challenge. For details, see HuksChallengePosition.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 9\n         */\n        /**\n         * Position of the 8-byte valid value in a custom challenge. For details, see HuksChallengePosition.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_CHALLENGE_POS = HuksTagType.HUKS_TAG_TYPE_UINT | 310,\n        /**\n         * Key authentication purpose.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 10\n         */\n        /**\n         * Key authentication purpose.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_AUTH_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT | 311,\n        /**\n         * Key storage security level, which is a value of HuksAuthStorageLevel.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * Key storage security level, which is a value of HuksAuthStorageLevel.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_AUTH_STORAGE_LEVEL = HuksTagType.HUKS_TAG_TYPE_UINT | 316,\n        /**\n         * User authentication mode, which is a value of HuksUserAuthMode.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_USER_AUTH_MODE = HuksTagType.HUKS_TAG_TYPE_UINT | 319,\n        /* Attestation related TAG: 501 - 600 */\n        /**\n         * Challenge value used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Challenge value used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ATTESTATION_CHALLENGE = HuksTagType.HUKS_TAG_TYPE_BYTES | 501,\n        /**\n         * Application ID used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Application ID used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ATTESTATION_APPLICATION_ID = HuksTagType.HUKS_TAG_TYPE_BYTES | 502,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_BRAND = HuksTagType.HUKS_TAG_TYPE_BYTES | 503,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_DEVICE = HuksTagType.HUKS_TAG_TYPE_BYTES | 504,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_PRODUCT = HuksTagType.HUKS_TAG_TYPE_BYTES | 505,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_SERIAL = HuksTagType.HUKS_TAG_TYPE_BYTES | 506,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_IMEI = HuksTagType.HUKS_TAG_TYPE_BYTES | 507,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_MEID = HuksTagType.HUKS_TAG_TYPE_BYTES | 508,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_MANUFACTURER = HuksTagType.HUKS_TAG_TYPE_BYTES | 509,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_MODEL = HuksTagType.HUKS_TAG_TYPE_BYTES | 510,\n        /**\n         * Key alias used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Key alias used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ATTESTATION_ID_ALIAS = HuksTagType.HUKS_TAG_TYPE_BYTES | 511,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_SOCID = HuksTagType.HUKS_TAG_TYPE_BYTES | 512,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ATTESTATION_ID_UDID = HuksTagType.HUKS_TAG_TYPE_BYTES | 513,\n        /**\n         * Security level used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Security level used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 514,\n        /**\n         * Version information used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Version information used in the attestation.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ATTESTATION_ID_VERSION_INFO = HuksTagType.HUKS_TAG_TYPE_BYTES | 515,\n        /*\n         * Other reserved TAG: 601 - 1000\n         *\n         * Extension TAG: 1001 - 9999\n         */\n        /**\n         * Whether to use the alias passed in during key generation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Whether to use the alias passed in during key generation.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IS_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 1001,\n        /**\n         * Key storage mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Key storage mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_STORAGE_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 1002,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IS_ALLOWED_WRAP = HuksTagType.HUKS_TAG_TYPE_BOOL | 1003,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_WRAP_TYPE = HuksTagType.HUKS_TAG_TYPE_UINT | 1004,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_AUTH_ID = HuksTagType.HUKS_TAG_TYPE_BYTES | 1005,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_ROLE = HuksTagType.HUKS_TAG_TYPE_UINT | 1006,\n        /**\n         * Flag of the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Flag of the key.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_FLAG = HuksTagType.HUKS_TAG_TYPE_UINT | 1007,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IS_ASYNCHRONIZED = HuksTagType.HUKS_TAG_TYPE_UINT | 1008,\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_SECURE_KEY_ALIAS = HuksTagType.HUKS_TAG_TYPE_BOOL | 1009,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_SECURE_KEY_UUID = HuksTagType.HUKS_TAG_TYPE_BYTES | 1010,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY_DOMAIN = HuksTagType.HUKS_TAG_TYPE_UINT | 1011,\n        /**\n         * Whether the key is accessible only when the user sets a lock screen password.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 11\n         */\n        /**\n         * Whether the key is accessible only when the user sets a lock screen password.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_IS_DEVICE_PASSWORD_SET = HuksTagType.HUKS_TAG_TYPE_BOOL | 1012,\n        /* Inner-use TAG: 10001 - 10999 */\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_PROCESS_NAME = HuksTagType.HUKS_TAG_TYPE_BYTES | 10001,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_PACKAGE_NAME = HuksTagType.HUKS_TAG_TYPE_BYTES | 10002,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_ACCESS_TIME = HuksTagType.HUKS_TAG_TYPE_UINT | 10003,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_USES_TIME = HuksTagType.HUKS_TAG_TYPE_UINT | 10004,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_CRYPTO_CTX = HuksTagType.HUKS_TAG_TYPE_ULONG | 10005,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_KEY = HuksTagType.HUKS_TAG_TYPE_BYTES | 10006,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_KEY_VERSION = HuksTagType.HUKS_TAG_TYPE_UINT | 10007,\n        /**\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_PAYLOAD_LEN = HuksTagType.HUKS_TAG_TYPE_UINT | 10008,\n        /**\n         * Used to pass in the AEAD in GCM mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Used to pass in the AEAD in GCM mode.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 11\n         */\n        HUKS_TAG_AE_TAG = HuksTagType.HUKS_TAG_TYPE_BYTES | 10009,\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_IS_KEY_HANDLE = HuksTagType.HUKS_TAG_TYPE_ULONG | 10010,\n        /**\n         * Os version related TAG.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_OS_VERSION = HuksTagType.HUKS_TAG_TYPE_UINT | 10101,\n        /**\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         * @deprecated since 9\n         */\n        HUKS_TAG_OS_PATCHLEVEL = HuksTagType.HUKS_TAG_TYPE_UINT | 10102,\n        /*\n         * Reserved TAGs: 11000 - 12000\n         *\n         * Other TAGs: 20001 - N\n         * TAGs used for paramSetOut\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_SYMMETRIC_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20001,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20002,\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Extension\n         * @since 8\n         */\n        /**\n         * Reserved.\n         *\n         * @syscap SystemCapability.Security.Huks.Core\n         * @atomicservice\n         * @since 12\n         */\n        HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = HuksTagType.HUKS_TAG_TYPE_BYTES | 20003\n    }\n}\nexport default huks;\n",
}
export default FILE;